package com.xudu.xianrendongculturaltravelbackend.demo.invoke;

import jakarta.annotation.Resource;
import org.springframework.ai.chat.model.ChatModel;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @ClassName SpringAiAiInvoke
 * @Description
 * @Author xudu
 * @Time 2025/4/30 9:33
 */
@Component
public class SpringAiAiInvoke implements CommandLineRunner {

    @Resource
    private ChatModel dashScopeChatModel;


    @Override
    public void run(String... args) throws Exception {
        //AssistantMessage output = dashScopeChatModel.call(new Prompt("你好,怎么学好编程？")).getResult().getOutput();
        //System.out.println(output.getText());
        return;
    }
}
